@isTest
   private class TestUpdateAccountTrigger {
      // Methods for testing
      static testMethod void updateAccountFields(){
    // Perform our data preparation.
    Account acc0 = new Account(name='test');
    acc0.Master_Account_Flag__c = true;
    insert acc0;
    Account acc1 = new Account(name='test');
    acc1.Master_Account_Flag__c = true;
    insert acc1;
     test.startTest();
     Contact con0 = new Contact(lastName='test0',Contact_Type__c='Employee');
     con0.AccountId = acc0.id;
     insert con0;
     con0.AccountId = acc1.id;
     upsert con0; 
     Contact con1 = new Contact(lastName='test0',Contact_Type__c='Visitor');
     con1.AccountId = acc0.id;
     insert con1;
     test.stopTest();
     Account acc = [SELECT Residence_Visa_Quota_Used__c FROM Account Where Id =: acc0.Id];
    // System.AssertEquals(acc.Residence_Visa_Quota_Used__c,1);      

}

   }